// interface Animal {
//   name: string;
//   age: number;
//   gender: number
// }
// /**
//  * From T pick a set of properties K
//  * type Pick<T, K extends keyof T> = { [P in K]: T[P] };
//  */
// // 摘取 Animal 中的 name 属性
// interface Person {
//   name: string;
//   age: number;
//   married: boolean
// }
// function pick<T, K extends keyof T>(obj: T, keys: K[]): Pick<T, K> {
//   const result: any = {};
//   keys.map(key => {
//     result[key] = obj[key];
//   });
//   return result
// }
// let person: Person = { name: 'zhufeng', age: 10, married: true };
// let result: Pick<Person, 'name' | 'age'> = pick<Person, 'name' | 'age'>(person, ['name', 'age']);
// console.log(result);



interface p1 {
  name: string
  age: number
  adress: string
}
interface p2 {
  name: string
  age: number
}
type T30<T, K> = { [k in Exclude<keyof T, keyof K>]: T[k] }
let result: T30<p1, p2>

